<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>优田儿童成长中心</title>
    <link href="/static/assets/fontAwesome/css/fontawesome-all.min.css" rel="stylesheet">
    <link href="/static/assets/css/lib/themify-icons.css" rel="stylesheet">
    <link href="/static/assets/css/lib/mmc-chat.css" rel="stylesheet"/>
    <link href="/static/assets/css/lib/sidebar.css" rel="stylesheet">
    <link href="/static/assets/css/lib/bootstrap.min.css" rel="stylesheet">
    <link href="/static/assets/css/lib/nixon.css" rel="stylesheet">
    <link href="/static/assets/lib/lobipanel/css/lobipanel.min.css" rel="stylesheet">
    <link href="/static/assets/css/style.css" rel="stylesheet">
</head>
<body>
<div class="sidebar sidebar-hide-to-small sidebar-shrink sidebar-gestures">
    <div class="nano">
        <div class="nano-content">
            <ul>
                <li>
                    <a href="/home/"><i class="ti-bar-chart"></i> 统计数据</a>
                </li>
                <li class="active">
                    <a href="/teacher/"><i class="ti-user"></i> 教师管理<span
                            class="sidebar-collapse-icon ti-angle-right"></span></a>
                </li>
                <li>
                    <a href="/child/"><i class="ti-user"></i> 幼儿管理</a>
                </li>
                <li>
                    <a href="/posts/"><i class="ti-desktop"></i> 岗位管理</a>
                </li>
            </ul>
        </div>
    </div>
</div>
<div class="header">
    <div class="pull-left">
        <div class="logo">
            <a>
                <img id="logoImg" src="/static/img/yt1.png" data-logo_big="/static/img/yt1.png"
                     data-logo_small="/static/img/yt3.png" alt="Nixon"/>
            </a>
        </div>
        <div class="hamburger sidebar-toggle">
            <span class="ti-menu"></span>
        </div>
    </div>
    <div class="pull-right p-r-15">
        <ul>
            <li class="header-icon dib">
                <img class="avatar-img" src="/static/assets/images/avatar/1.jpg" alt=""/> <span
                    class="user-avatar"><span th:text="${session.username}"></span>&nbsp;&nbsp;&nbsp;<i
                    class="ti-angle-down f-s-10"></i></span>
                <div class="drop-down dropdown-profile">
                    <div class="dropdown-content-body">
                        <ul>
                            <li><a href="/exit/"><i class="ti-power-off"></i> <span>注销</span></a></li>
                        </ul>
                    </div>
                </div>
            </li>
        </ul>
    </div>
</div>
<div class="content-wrap">
    <div class="main">
        <div class="container-fluid">
            <div class="row">
                <div class="col-lg-8 p-0">
                    <div class="page-header">
                        <div class="page-title">
                            <h1>
                                <span class="ti-calendar"></span>
                                <span th:text="${ysal.month} + ' 教师工资详情'"></span>
                            </h1>
                        </div>
                    </div>
                </div>
                <div class="col-lg-4 p-0">
                    <div class="page-header">
                        <div class="page-title">
                            <ol class="breadcrumb text-right">
                                <a href="javascript:;" class="btn-link" style="font-size: 16px;" id="back">
                                    <span class="glyphicon glyphicon-triangle-left" aria-hidden="true"></span>返回
                                </a>
                            </ol>
                        </div>
                    </div>
                </div>
            </div>
            <div class="main-content">
                <div class="row">
                    <div class="col-lg-6">
                        <div class="card alert">
                            <div class="card-header">
                                <input type="hidden" id="ttype" th:value="${t.ttype}" />
                                <h4>
                                    <span class="ti-receipt"></span> 基本工资
                                </h4>
                                <div class="card-header-right-icon">
                                </div>
                            </div>
                            <div class="card-body">
                                <table class="table table-responsive table-striped">
                                    <thead>
                                    <tr style="background-color: rgba(20,160,255,0.19)">
                                        <th>底薪</th>
                                        <th>补助</th>
                                        <th>班额</th>
                                        <th>卫生</th>
                                        <th>工龄</th>
                                        <th>学历</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <tr>
                                        <td id="base_sal" th:text="${ysal.base_sal}">0</td>
                                        <td id="subsidy" th:text="${ysal.subsidy}">0</td>
                                        <td id="class_size" th:text="${ysal.class_size}">0</td>
                                        <td id="health" th:text="${ysal.health}">0</td>
                                        <td id="year" th:text="${ysal.year}">0</td>
                                        <td id="edu" th:text="${ysal.edu}">0</td>
                                    </tr>
                                    </tbody>
                                    <tfoot>
                                    <tr>
                                        <td class="color-primary" colspan="6" align="right">
                                            <span th:text="'￥' + (${ysal.base_sal} + ${ysal.subsidy} + ${ysal.class_size} + ${ysal.health} + ${ysal.year} + ${ysal.edu})"></span>
                                        </td>
                                    </tr>
                                    </tfoot>
                                </table>
                            </div>
                        </div>
                    </div>
                    <div class="col-lg-6">
                        <div class="card alert">
                            <div class="card-header">
                                <h4>
                                    <span class="ti-receipt"></span> 绩效工资
                                </h4>
                                <div class="card-header-right-icon">
                                </div>
                            </div>
                            <div class="card-body">
                                <table class="table table-responsive table-striped">
                                    <thead>
                                    <tr style="background-color: rgba(255,187,68,0.19)">
                                        <th>绩效1</th>
                                        <th>绩效2</th>
                                        <th>绩效3</th>
                                        <th>绩效4</th>
                                        <th>绩效5</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <tr>
                                        <td id="merits_sal1" th:text="${ysal.merits_sal1}">0</td>
                                        <td id="merits_sal2" th:text="${ysal.merits_sal2}">0</td>
                                        <td id="merits_sal3" th:text="${ysal.merits_sal3}">0</td>
                                        <td id="merits_sal4" th:text="${ysal.merits_sal4}">0</td>
                                        <td id="merits_sal5" th:text="${ysal.merits_sal5}">0</td>
                                    </tr>
                                    </tbody>
                                    <tfoot>
                                    <tr>
                                        <td class="color-primary" colspan="5" align="right">
                                            <span th:text="'￥' + (${ysal.merits_sal1} + ${ysal.merits_sal2} + ${ysal.merits_sal3} + ${ysal.merits_sal4} + ${ysal.merits_sal5})"></span>
                                        </td>
                                    </tr>
                                    </tfoot>
                                </table>
                            </div>
                        </div>
                    </div>
                    <div class="col-lg-6">
                        <div class="card alert">
                            <div class="card-header">
                                <h4>
                                    <span class="ti-receipt"></span> 奖金
                                </h4>
                                <div class="card-header-right-icon">
                                </div>
                            </div>
                            <div class="card-body">
                                <table class="table table-responsive table-striped"
                                       style="border: solid 1px #ebccd1;border-radius: 4px">
                                    <thead>
                                    <tr style="background-color: #f2dede;color: #a94442">
                                        <td>全勤奖</td>
                                        <td>安全奖</td>
                                        <td>教育教学</td>
                                        <td align="right">班级新生补助</td>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <tr>
                                        <td id="full_time" th:text="${ysal.full_time}">0</td>
                                        <td id="safe" th:text="${ysal.safe}">0</td>
                                        <td id="class_hour" th:text="${ysal.class_hour}">0</td>
                                        <td id="newstu" th:text="${ysal.newstu}">0</td>
                                    </tr>
                                    </tbody>
                                    <tfoot>
                                    <tr>
                                        <td class="color-primary" colspan="4" align="right">
                                            <span th:text="'￥' + (${ysal.full_time} + ${ysal.safe} + ${ysal.class_hour} + ${ysal.newstu})"></span>
                                        </td>
                                    </tr>
                                    </tfoot>
                                </table>
                            </div>
                        </div>
                    </div>
                    <div class="col-lg-3">
                        <div class="card alert">
                            <div class="card-header">
                                <h4>
                                    <span class="ti-receipt"></span> 扣减项
                                </h4>
                                <div class="card-header-right-icon">
                                </div>
                            </div>
                            <div class="card-body">
                                <table class="table table-responsive table-striped">
                                    <thead>
                                    <tr style="background-color: rgba(255,81,22,0.19)">
                                        <th>请假</th>
                                        <th>其他</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <tr>
                                        <td id="for_leave" th:text="${ysal.for_leave}">0</td>
                                        <td id="other" th:text="${ysal.other}">0</td>
                                    </tr>
                                    </tbody>
                                    <tfoot>
                                    <tr>
                                        <td class="color-primary" colspan="4" align="right">
                                            <span th:text="'￥-' + (${ysal.for_leave} + ${ysal.other})"></span>
                                        </td>
                                    </tr>
                                    </tfoot>
                                </table>
                            </div>
                        </div>
                    </div>
                    <div class="col-lg-3">
                        <div class="card alert">
                            <div class="card-header">
                                <h4>
                                    <span class="ti-receipt"></span> 增加项
                                </h4>
                                <div class="card-header-right-icon">
                                </div>
                            </div>
                            <div class="card-body">
                                <table class="table table-responsive table-striped">
                                    <thead>
                                    <tr style="background-color: rgba(81,255,55,0.19)">
                                        <th>加班补助</th>
                                        <th>延点班代课</th>
                                    </tr>
                                    </thead>
                                    <tbody>
                                    <tr>
                                        <td id="class_out" th:text="${ysal.class_out}">0</td>
                                        <td id="add_class" th:text="${ysal.add_class}">0</td>
                                    </tr>
                                    </tbody>
                                    <tfoot>
                                    <tr>
                                        <td class="color-primary" colspan="4" align="right">
                                            <span th:text="'￥' + (${ysal.class_out} + ${ysal.add_class})"></span>
                                        </td>
                                    </tr>
                                    </tfoot>
                                </table>
                            </div>
                        </div>
                    </div>
                    <div class="col-lg-12">
                        <div class="card alert">
                            <div class="card-header">
                                <h4>
                                    <span class="ti-layout-media-overlay"></span> 合计
                                </h4>
                                <div class="card-header-right-icon">
                                </div>
                            </div>
                            <div class="card-body">
                                <table class="table table-responsive table-striped">
                                    <tfoot>
                                    <tr>
                                        <td class="color-danger" align="right"><strong>
                                            <span id="total">￥0.00</span>
                                        </strong>
                                    </tr>
                                    </tfoot>
                                </table>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            Copyright &copy; 2024
        </div>
    </div>
</div>
<script src="/static/assets/js/lib/jquery.min.js"></script>
<script src="/static/assets/js/lib/jquery.nanoscroller.min.js"></script>
<script src="/static/assets/js/lib/sidebar.js"></script>
<script src="/static/assets/js/lib/bootstrap.min.js"></script>
<script src="/static/assets/js/lib/mmc-common.js"></script>
<script src="/static/assets/js/lib/mmc-chat.js"></script>
<script src="/static/assets/js/lib/chart-js/Chart.bundle.js"></script>
<script src="/static/assets/js/lib/chart-js/chartjs-init.js"></script>
<script src="/static/assets/js/lib/datamap/d3.min.js"></script>
<script src="/static/assets/js/lib/datamap/topojson.js"></script>
<script src="/static/assets/js/lib/datamap/datamaps.world.min.js"></script>
<script src="/static/assets/js/lib/datamap/datamap-init.js"></script>
<script src="/static/assets/lib/lobipanel/js/lobipanel.js"></script>
<script src="/static/assets/js/scripts.js"></script>
<script th:inline="javascript">
    $(document).ready(function () {
        $('#lobipanel-custom-control').lobiPanel({
            reload: false,
            close: false,
            editTitle: false
        });
        $('#back').click(function () {
            history.back();
        });
    });

    function getFloat(id) {
        let val = parseFloat(document.getElementById(id)?.textContent || "0");
        return isNaN(val) ? 0 : val;
    }

    let base_sal = getFloat('base_sal');
    let subsidy = getFloat('subsidy');
    let class_size = getFloat('class_size');
    let health = getFloat('health');
    let year = getFloat('year');
    let edu = getFloat('edu');

    let m1 = getFloat('merits_sal1');
    let m2 = getFloat('merits_sal2');
    let m3 = getFloat('merits_sal3');
    let m4 = getFloat('merits_sal4');
    let m5 = getFloat('merits_sal5');

    let full_time = getFloat('full_time');
    let safe = getFloat('safe');
    let class_hour = getFloat('class_hour');
    let newstu = getFloat('newstu');

    let for_leave = getFloat('for_leave');
    let other = getFloat('other');

    let class_out = getFloat('class_out');
    let add_class = getFloat('add_class');

    let total = base_sal + subsidy + class_size + health + year + edu +
        m1 + m2 + m3 + m4 + m5 +
        full_time + safe + class_hour + newstu +
        class_out + add_class -
        for_leave - other;

    document.getElementById('total').textContent = '￥' + total.toFixed(2);
</script>
<style>
    .copyrights {
        text-indent: -9999px;
        height: 0;
        line-height: 0;
        font-size: 0;
        overflow: hidden;
    }
</style>
<div class="copyrights">
    <h3>&copy; 版权所有 | </h3>
</div>
</body>

</html>